Skip to content

refactor: rely on LaunchDarkly SDK key environment#435

Merged
matthewlouisbrockman merged 1 commit into
mainfrom
refactor/remove-ld-feature-flag-env
Jun 18, 2026
Merged

refactor: rely on LaunchDarkly SDK key environment#435
matthewlouisbrockman merged 1 commit into
mainfrom
refactor/remove-ld-feature-flag-env

Conversation

@ben-fornefeld

@ben-fornefeld ben-fornefeld commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

  • remove the explicit FEATURE_FLAG_ENVIRONMENT env var and validation
  • stop passing an environment attribute in LaunchDarkly OpenFeature contexts
  • rely on the configured LaunchDarkly SDK key to select staging/production

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Jun 18, 2026 1:58am

Request Review

@cla-bot cla-bot Bot added the cla-signed label Jun 18, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@cursor

cursor Bot commented Jun 18, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
LaunchDarkly rules that targeted the removed environment attribute will behave differently until updated; wrong SDK keys per deploy would evaluate flags against the wrong LD project/environment.

Overview
Removes FEATURE_FLAG_ENVIRONMENT from env schema, .env.example, startup validation in scripts/check-app-env.ts, and docs so LaunchDarkly staging vs production is chosen only by LAUNCHDARKLY_SDK_KEY.

FeatureFlagContext no longer carries an environment field; getFeatureFlagEnvironment and its VERCEL_ENV fallback are deleted. OpenFeature evaluation contexts for user/team no longer include an environment attribute, so LaunchDarkly targeting must not depend on that custom attribute.

Unit tests drop environment-related expectations and the getFeatureFlagEnvironment suite.

Reviewed by Cursor Bugbot for commit 36ac680. Bugbot is set up for automated code reviews on this repo. Configure here.

@matthewlouisbrockman matthewlouisbrockman merged commit 00d78bd into main Jun 18, 2026
14 checks passed
@matthewlouisbrockman matthewlouisbrockman deleted the refactor/remove-ld-feature-flag-env branch June 18, 2026 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants